home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / editor / auror300.zip / BRKBD.AML < prev    next >
Text File  |  1996-07-17  |  24KB  |  638 lines

  1. //--------------------------------------------------------------------
  2. // The Aurora Editor v3.0, Copyright (C) 1993-1996 nuText Systems
  3. //
  4. // KBD.AML
  5. // Brief Keyboard definitions (included by Main.aml)
  6. //
  7. // If you have made any changes, save this file and select Recompile
  8. // the Editor from the Set menu. Exit and re-enter the editor for
  9. // your changes to take effect.
  10. //--------------------------------------------------------------------
  11.  
  12. //--------------------------------------------------------------------
  13. // Edit and File Manager windows
  14. //--------------------------------------------------------------------
  15.  
  16. forward object prf
  17.  
  18. object edit_fmgr
  19.  
  20.   // Controls
  21.   function  '≡'                                // close window
  22.     close
  23.   end
  24.  
  25.   // Menu activation
  26.   key  <esc>           gotobar                 // to last menu bar item (br)
  27.   key  <f10>           gotobar                 // to last menu bar item (br)
  28.   key  <alt h>         gotomenu "help"         // goto help pull-down menu (br)
  29.  
  30.   // Scroll
  31.   key  <pgdn>          pagedown                // scroll down (br)
  32.   key  <pgup>          pageup                  // scroll up (br)
  33.   key  <ctrl home>     row (getviewtop)        // to page top (br)
  34.   key  <ctrl end>      row (getviewbot)        // to page bottom (br)
  35.   key  <ctrl pgup>     row 1                   // to file top (br)
  36.   key  <ctrl pgdn>     row (getlines)          // to file bottom (br)
  37.   key  <ctrl c>        adjustrow               // center cursor (br)
  38.   key  <ctrl t>        adjustrow 1             // scroll to page top (br)
  39.   key  <ctrl b>        adjustrow (getviewrows) // scroll to page bottom (br)
  40.  
  41.   // scroll up one line (br)
  42.   key  <ctrl e>
  43.     rollrow -1
  44.     if getrow < getviewbot then
  45.       down
  46.     end
  47.   end
  48.  
  49.   // scroll down one line (br)
  50.   key  <ctrl d>
  51.     rollrow 1
  52.     if getrow > getviewtop then
  53.       up
  54.     end
  55.   end
  56.  
  57.   // File
  58.   key  <ctrl n>        opennew                 // new edit window
  59.   key  <alt e>         askopen                 // open prompt (br)
  60.   key  <alt b>         filelist                // file list (br)
  61.   key  <ctrl ->        close                   // close window (br)
  62.   key  <alt x>         closeall                // close all windows (br)
  63.   key  <shift f1>      quickref 'qw'           // quick function reference
  64.   key  <shift f2>      quickref 'fw'           // function reference
  65.  
  66.   // Window
  67.   key  <f1>            winlist                 // window list
  68.   key  <ctrl z>        maximize                // maximize window (br)
  69.   key  <alt f2>        maximize                // maximize window (br)
  70.   key  <ctrl a>        nextwindow              // next window
  71.   key  <f12>           prevwindow              // prev window
  72.   key  <shift f3>      tile 'v'                // tile vertical
  73.   key  <shift f4>      tile 'h'                // tile horizontal
  74.   key  <shift f5>      cascade                 // cascade
  75.   key  <ctrl o><q>     close                   // close window
  76.  
  77.   // Search
  78.   key  <ctrl s>        askscan                 // file scan prompt
  79.   key  <ctrl 6>        cyclebook               // cycle through bookmarks
  80.  
  81.   // go to bookmark
  82.   key  <alt j>         askbook "Go to bookmark [0-9]"
  83.  
  84.   // Print
  85.   key  <ctrl p>        print                   // print
  86.   key  <alt p>         print 'b'               // print block (br)
  87.  
  88.   // Set
  89.   key  <ctrl f1>       togglemode              // toggle video mode
  90.  
  91.   // Macro
  92.   key  <alt f7>        askopenkey              // open key macro (br)
  93.   key  <alt f8>        asksavekey              // save key macro (br)
  94.   key  <ctrl v>        askeval                 // macro command prompt
  95.   key  <alt f9>        askrun                  // Dos command prompt
  96.   key  <alt z>         shell                   // exit to Dos (br)
  97.   key  <shift f12>     pickmacro               // macro picklist
  98.   key  <ctrl f12>      runmacro2 "maclist"     // macro menu
  99.  
  100.   // display version
  101.   key  <alt v>         say "Version is: " + getversion
  102.  
  103.   // undefined or unnamed keys
  104.   key <otherkey> (keycode)
  105.     say  (geteventname (keycode)) + " not defined "
  106.   end
  107.  
  108.  
  109. //--------------------------------------------------------------------
  110. // Prompts and Edit windows
  111. //--------------------------------------------------------------------
  112.  
  113. object prompt
  114.  
  115.   // Controls
  116.   function  '≡'        close                   // close window
  117.   function  '*'        enter                   // simulate <enter>
  118.                                                //  (2-line box only)
  119.  
  120.   // Cursor
  121.   key  <left>          left                    // move cursor left (br)
  122.   key  <right>         right                   // move cursor right (br)
  123.   key  <home>          col 1                   // to column one (br)
  124.   key  <end>           col  getlinelen + 1     // to end of line (br)
  125.  
  126.   // Cursor + CUA-marking
  127.   key  <shift left>    left
  128.                        smark
  129.   key  <shift right>   right
  130.                        smark
  131.   key  <shift home>    col 1
  132.                        smark
  133.   key  <shift end>     col getlinelen + 1
  134.                        smark
  135.  
  136.   // Scroll
  137.   key  <alt left>      rollcol -(getviewcols - 1)   // page left
  138.   key  <alt right>     rollcol   getviewcols - 1    // page right
  139.  
  140.   // Editing
  141.   key  <alt i>         setting 'I' TOGGLE      // toggle insert mode (br)
  142.  
  143.   // delete character/block (br)
  144.   key  <del>
  145.     if getmarkbuf == getcurrbuf then
  146.       deleteblock2
  147.     else
  148.       if wintype? "edit" then
  149.         send "delchar2"
  150.       else
  151.         delchar
  152.       end
  153.     end
  154.   end
  155.  
  156.   key  <backspace>     backsp                  // delete left character (br)
  157.   key  <alt k>         delchar MAX_COL         // erase to end of line (br)
  158.   key  <ctrl k>        delchar getcol - 1 1    // erase to beginning of line (br)
  159.   key  <alt q>         literal                 // enter literal character (br)
  160.   key  <alt =>         asciilist               // display ascii chart
  161.  
  162.   // Block
  163.   key  <alt a>         destroymark             // mark character (br)
  164.                        markchar
  165.  
  166.   key  <alt c>         destroymark             // mark column (br)
  167.                        markcolumn
  168.  
  169.   key  <alt m>         destroymark             // mark stream (br)
  170.                        markstream
  171.  
  172.   // paste from clipboard to prompt (br)
  173.   key  <ins>
  174.                        oldmark = usemark _ClipName
  175.                        instext (getmarktext)
  176.                        usemark oldmark
  177.                        col  getlinelen + 1
  178.  
  179.   // copy from prompt to clipboard (br)
  180.   key  <grey+>         copy
  181.  
  182.   // Prompt history
  183.   key  <up>            prevhist                // retrieve prev prompt
  184.   key  <down>          nexthist                // retrieve next prompt
  185.   key  <pgup>          askhistory              // history popup menu
  186.   key  <pgdn>          askhistory              // history popup menu
  187.  
  188.   // Exit
  189.   key  <esc>           close                   // quit prompt
  190.   key  <ctrl ->        close
  191.  
  192.   // non-function keys
  193.   key  <char> (character)                      // typeable keys
  194.     write character
  195.   end
  196.  
  197.   // filename completion
  198.   key  <ctrl tab>      askcomplete             // filename completion
  199.   key  <tab>           askcomplete             // filename completion
  200.  
  201.  
  202. //--------------------------------------------------------------------
  203. // Edit windows
  204. //--------------------------------------------------------------------
  205.  
  206. object edit
  207.  
  208.   // Controls
  209.   function  '≡'
  210.     close                                      // close window
  211.   end
  212.  
  213.   // Menu
  214.   key  <esc>           gotobar                 // to last menu bar item (br)
  215.  
  216.   // Cursor
  217.   key  <up>            up                      // move cursor up (br)
  218.   key  <down>          down                    // move cursor down (br)
  219.  
  220.   // Cursor + CUA-marking
  221.   key  <shift up>      up
  222.                        smark
  223.   key  <shift down>    down
  224.                        smark
  225.  
  226.   // brief <home> key emulation (br)
  227.   key <home>
  228.     col 1                                      // goto column 1